-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix react-frame-component by supporting nullish portals #3896
Conversation
Size Change: -31 B (0%) Total Size: 57 kB
ℹ️ View Unchanged
|
compat/src/portals.js
Outdated
// When we come from a conditional render, on a mounted | ||
// portal we should clear the DOM. | ||
else if (_this._temp) { | ||
if (!props._vnode && _this._temp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just remove this condition and the this.unmount call now. When a null vnode is received, we will render the provider with null
as it's only child, which produces the same result as calling unmount (because there is no componentDidUnmount method on this provider).
LGTM but I'd like to check if we can remove that condition entirely. |
Closing due to inactivity |
fixes #2653
This allows for nullish portals